<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">


<head>

    <link rel="stylesheet" type="text/css" href="/static/lib/datatables/1.10.15/jquery.dataTables.css">
    <link rel="stylesheet" href="/static/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <div th:include="admin/common :: head"></div>
    <style type="text/css">
        th {
            text-align: center;
        }

        .table td {
            text-align: center;
        }
    </style>
    <title>课程分类</title>
</head>
<body>


<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>课程管理
    <span class="c-gray en">&gt;</span> 课程分类
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>

<div class="page-container">



    <div class="Hui-article">


        <div class="pos-a" style="width:150px;left:0;top:0; bottom:0; height:100%; border-right:1px solid #e5e5e5; background-color:#f5f5f5">
            <ul id="treeDemo" class="ztree" style="padding-top:15px"></ul>
        </div>

        <iframe ID="testIframe" Name="testIframe" FRAMEBORDER=0 SCROLLING=AUTO width=100%  height=100%
                SRC="/admin/course/courseCategoryIframe/1"></iframe>




    </div>

</div>




<footer th:include="admin/common :: footer"></footer>

<script type="text/javascript" src="/static/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/static/lib/datatables/1.10.15/jquery.dataTables.js"></script>
<script type="text/javascript" src="/static/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">

    var setting = {
        data: {
            simpleData: {
                enable:true,
                idKey: "id",
                pIdKey: "parentId",
                rootPId: ""
            },
        },
        edit: {
            enable: true,
            showRemoveBtn: false,
            showRenameBtn: false,
        },
        view: {
            dblClickExpand: false,
            showLine: true,
            selectedMulti: false,
        },
        callback: {
            beforeClick: function(treeId, treeNode) {
                demoIframe.attr("src","/admin/course/courseCategoryIframe/"+treeNode.id);//"/admin/add/"+treeNode.id
                //window.location.href="/admin/course/courseCategoryList/"+treeNode.id;
                return true;
            }
        }
    };
    //加载ztree
    $(document).ready(function(){
        var zNodes ='[(${list})]';
        zNodes=eval("("+zNodes+")");
        var t = $("#treeDemo");
        t = $.fn.zTree.init(t, setting, zNodes);
        demoIframe = $("#testIframe");
        var zTree = $.fn.zTree.getZTreeObj("treeDemo");
        zTree.expandAll(true);//展开所有树

    });



</script>




</body>
</html>